import { Module, Global } from '@nestjs/common';
import { WinstonModule } from 'nest-winston';
import { winstonConfig } from '../common/logger/logger.config';
import { Logger } from 'winston';
import {} from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
@Global()
@Module({
  imports: [
    WinstonModule.forRootAsync({
      inject: [ConfigService],
      useFactory: (configService: ConfigService) =>
        winstonConfig.call(this, configService),
    }),
  ],
  providers: [Logger],
  exports: [Logger],
})
export class LoggerModule {}
